<?xml version="1.0" encoding="utf-8"?>

<EFFECT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns ="urn:dsfx0">    
  
  <DST_STATE_GROUP>
    <NAME>DepthNoTestNoWrite</NAME>
    <DEPTH_ENABLE>false</DEPTH_ENABLE>
    <DEPTH_WRITE>false</DEPTH_WRITE>
  </DST_STATE_GROUP>

  <BLEND_STATE_GROUP>
    <NAME>NoBlend</NAME>
    <SEPARATE_BLEND>false</SEPARATE_BLEND>
    <TARGET>
      <ID>0</ID>
      <BLEND_ENABLE>false</BLEND_ENABLE>
    </TARGET>
  </BLEND_STATE_GROUP>

  <RAST_STATE_GROUP>
    <NAME>Solid</NAME>
    <CULL_MODE>None</CULL_MODE>
    <FILL_MODE>Solid</FILL_MODE>
    <DEPTH_BIAS>0</DEPTH_BIAS>
    <DEPTH_SLOPE_FACTOR>0</DEPTH_SLOPE_FACTOR>
  </RAST_STATE_GROUP>

  <SAMPLER>
    <NAME>ao</NAME>
    <SAMPLER_DECLARATION>
      <SAMPLER_TYPE>sampler2DMS</SAMPLER_TYPE>
    <SAMPLER_OPTION_GRAMMAR>IS_MSAA</SAMPLER_OPTION_GRAMMAR>
    </SAMPLER_DECLARATION>
    <SAMPLER_DECLARATION>
      <SAMPLER_TYPE>sampler2D</SAMPLER_TYPE>
    <SAMPLER_OPTION_GRAMMAR>!IS_MSAA</SAMPLER_OPTION_GRAMMAR>
    </SAMPLER_DECLARATION>
    <SAMPLER_SECONDARY_TYPE>color</SAMPLER_SECONDARY_TYPE>
  </SAMPLER>

  <SAMPLER>
    <NAME>changeList</NAME>
    <SAMPLER_DECLARATION>
      <SAMPLER_TYPE>usampler2DMS</SAMPLER_TYPE>
    <SAMPLER_OPTION_GRAMMAR>IS_MSAA</SAMPLER_OPTION_GRAMMAR>
    </SAMPLER_DECLARATION>
    <SAMPLER_DECLARATION>
      <SAMPLER_TYPE>usampler2D</SAMPLER_TYPE>
    <SAMPLER_OPTION_GRAMMAR>!IS_MSAA</SAMPLER_OPTION_GRAMMAR>
    </SAMPLER_DECLARATION>
  </SAMPLER>

  <SAMPLER>
    <NAME>cellIndices</NAME>
    <SAMPLER_DECLARATION>
      <SAMPLER_TYPE>usampler2DMS</SAMPLER_TYPE>
    <SAMPLER_OPTION_GRAMMAR>IS_MSAA</SAMPLER_OPTION_GRAMMAR>
    </SAMPLER_DECLARATION>
    <SAMPLER_DECLARATION>
      <SAMPLER_TYPE>usampler2D</SAMPLER_TYPE>
    <SAMPLER_OPTION_GRAMMAR>!IS_MSAA</SAMPLER_OPTION_GRAMMAR>
    </SAMPLER_DECLARATION>
  </SAMPLER>
  
  <SAMPLER_STATE>
    <NAME>smpLinear</NAME>
    <MAG_FILTER>Linear</MAG_FILTER>
    <MIN_FILTER>Linear</MIN_FILTER>
    <MIP_FILTER>None</MIP_FILTER>
  </SAMPLER_STATE>

  <SAMPLER_STATE>
    <NAME>smpNone</NAME>
    <MAG_FILTER>None</MAG_FILTER>
    <MIN_FILTER>None</MIN_FILTER>
    <MIP_FILTER>None</MIP_FILTER>
  </SAMPLER_STATE>
  
  <TECHNIQUE>
    <NAME>Default</NAME>
    <PASS>
      <SAMPLER_ASSIGNMENT_LIST>
        <SAMPLER_ASSIGNMENT>
          <SAMPLER>ao</SAMPLER>
          <STATES>smpLinear</STATES>
        </SAMPLER_ASSIGNMENT>
        <SAMPLER_ASSIGNMENT>
          <SAMPLER>changeList</SAMPLER>
          <STATES>smpNone</STATES>
        </SAMPLER_ASSIGNMENT>
        <SAMPLER_ASSIGNMENT>
          <SAMPLER>cellIndices</SAMPLER>
          <STATES>smpNone</STATES>
        </SAMPLER_ASSIGNMENT>
      </SAMPLER_ASSIGNMENT_LIST>

      <STREAMS>
        <STREAM>
          <STAGES>Vertex_Fragment</STAGES>
          <VARYING>
            <NAME>vTexCoord</NAME>
            <TYPE>float2</TYPE>
            <QUALIFIER>smooth</QUALIFIER>
          </VARYING>
        </STREAM>
      </STREAMS>

      <SHADER_OPTIONS>
        <SHADER_OPTION>
          <NAME>NeedUVs</NAME>
          <OPTION_VALUE>1</OPTION_VALUE>
        </SHADER_OPTION>
        <SHADER_OPTION>
          <NAME>TexCoordAsVec2</NAME>
          <OPTION_VALUE>1</OPTION_VALUE>
        </SHADER_OPTION>
        <SHADER_OPTION>
          <NAME>POSTEFFECT_NO_MAINCB</NAME>
          <OPTION_VALUE>1</OPTION_VALUE>
        </SHADER_OPTION>
      </SHADER_OPTIONS>
      
      <NAME>Pass0</NAME>
      <BLEND_STATE>NoBlend</BLEND_STATE>
      <DEPTH_STENCIL_STATE>DepthNoTestNoWrite</DEPTH_STENCIL_STATE>
      <RASTERIZER_STATE>Solid</RASTERIZER_STATE>
      <COMMONS>streams varyings</COMMONS>
      <VERTEX_STAGE>PostEffect_FullScreenQuadVS</VERTEX_STAGE>
      <FRAGMENT_STAGE>PostEffect_DeclarePS PostEffect_Helpers PostEffect_Texture_Helpers  PostEffect_Blit_RTAO</FRAGMENT_STAGE>
    </PASS>
  </TECHNIQUE>
  
</EFFECT>
